function http(url, data = {}, method = "GET",token) {
	return new Promise((resolve, reject) => {
		uni.request({
			url:'https://uapi.xqb.ink'+url,
			data: data,
			method: method,
			header:{
				'content-type':'application/x-www-form-urlencoded',
				 authorization:token
			},
			success: res => {
				// console.log(res)
				resolve(res)
			},
			fail: err => {
				// console.log(err)
				reject(err)
			}
		})

	})
}

export {http}
